package test3_13.Hero;
import java.util.Scanner;
public class Homework7_10_Hero {
    public static void main(String[] args) {
        Hero hero = new Hero();
        hero.name = "Chen";
        hero.power = 100;

        while (hero.power >0){
            System.out.println("请输入要执行的数字步骤：");
            Scanner sc = new Scanner(System.in);
            int num = sc.nextInt();
            switch (num){
                case 1:
                    hero.go();
                    break;
                case 2:
                    hero.eat(7);
                    break;
                case 3:
                    hero.hurt();
                    break;
            }
        }
    }
}
